<?php
/*
In php we don't need to define
data types of varibales.

Complier of PHP assumes datatypes of
varibale according to it's value.

"PHP is loosely coupled language"
*/
$var = 123;
var_dump($var);
$var = 123.456;
var_dump($var);
$var = " hello world ";
var_dump($var);
$var = false;
var_dump($var);
echo "\n\n------------\n\n";

echo gettype(123);
echo "\n";
echo gettype(123.456);
echo "\n";
echo gettype(" hello world ");
echo "\n";
echo gettype(false);
echo "\n";

echo "\n\n---- Use of gettype() ------\n\n";

$a = 123;

if(gettype($a) == 'integer') {
  echo __LINE__ , '$a is integer';
}

if(var_dump($a) == 'integer') {
  echo __LINE__ , '$a is integer';
}








